<template>

  <div class="container" style="display: flex;flex-direction: column;">

    <practice-result-info :result="result" :right-cnt="totalRightCnt"/>

    <div @click="onExamAgainClick"
         :class=" this.isMobile ? 'btn againBtn' : 'btn againBtn pointer'">
      重新练习
    </div>
  </div>


</template>

<script>
  import PracticeResultInfo from '../components/PracticeResultInfo'
  import ExamResultMixin from "../exam-result-mixin";
  import {replace} from "../../../../router/util";

  export default {
    components: {PracticeResultInfo},
    mixins: [ExamResultMixin],
    methods: {
      onExamAgainClick() {
        if (this.errorType === '1') {
          //错题
          replace(`/exam/error/${this.examId}/${this.subjectId}`)
        } else {
          replace(`/exam/normal/${this.examId}/${this.subjectId}/1`)
        }
      },
    },
  }
</script>

<style scoped>

  .container {
    align-items: center;
  }

  .btn {
    width: 160px;
    height: 48px;
    border-radius: 4px;
    font-size: 20px;
    font-weight: bold;
    line-height: 48px;
    text-align: center;
  }

  .againBtn {
    margin-top: 56px;
    background-color: #1286F7;
    color: white;
  }

</style>
